//
//  UUIntentOrderManager.h
//  UUCharterSupplier
//
//  Created by ZhangAo on 27/02/2018.
//  Copyright © 2018 UUCharter. All rights reserved.
//

#import <UUFoundation/DKBaseManager.h>
#import "UUIntentOrderModel.h"

@protocol UUIntentOrderManagerObserver

// actionType 为 UUIntentOrderActionType
- (void)intentOrderDidUpdate:(NSNumber *)orderId withActionType:(NSNumber *)actionType;

@end

#define GetIntentOrderManager()         ([UUIntentOrderManager sharedInstance])

@interface UUIntentOrderManager : DKBaseManager

// 获取未读数
- (void)asyncFetchIntentCountWithCompleteBlock:(void (^)(NSInteger count, NSError *error))completeBlock;

// 获取待报价列表
- (void)asyncFetchIntentOrdersWithSince:(id)since
                                 length:(int)length
                          completeBlock:(void (^)(NSArray<UUIntentOrderModel *> *orders, id since, NSError *error))completeBlock;

// 获取报价详情
- (void)asyncFetchIntentOrderDetailWithOrderId:(NSNumber *)orderId
                                 completeBlock:(void (^)(UUIntentOrderDetailModel *orderDetail, NSError *error))completeBlock;

// 更新报价状态
- (void)asyncUpdateIntentOrderWithOrderId:(NSNumber *)orderId
                                    price:(NSNumber *)price
                               actionType:(UUIntentOrderActionType)actionType
                            completeBlock:(void (^)(NSError *error))completeBlock;

// 更新接收提醒的设置
- (void)asyncUpdateIntentOrderReceiveNotification:(BOOL)isReceive
                                    completeBlock:(void (^)(NSError *error))completeBlock;

// 获取历史报价列表
- (void)asyncFetchIntentOrderHistoryLisWithSince:(id)since
                                          length:(int)length
                                   completeBlock:(void (^)(NSArray<NSNumber *> *orders, id since, NSError *error))completeBlock;

// 获取历史报价 Model
- (UUIntentOrderHistoryModel *)fetchIntentHistoryOrderWithOrderId:(NSNumber *)orderId;

@end
